package main

import "fmt"

func main() {

	//A. var ch chan int  √
	//B. ch := make(chan int)  √
	//C. <- ch  √
	//D. ch <-

	var m map[person]int = make(map[person]int)
	p := person{"mike"}
	fmt.Println(m[p]) //0 打印一个 map 中不存在的值时

	//-------------------

	i := []int{5, 6, 7}
	hello(i...)
	fmt.Println(i[0]) //18
}

type person struct {
	name string
}

func hello(num ...int) {
	num[0] = 18
}
